# -*- coding: utf-8 -*-

# 用range(1, 101)可以创建数组
for i in range(1, 101):
    if i % 7 == 0:
        print i

#迭代dict的value
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
for v in d.itervalues():
    sum = sum + v
print sum / len(d)

#迭代dict的key和value
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
for k, v in d.iteritems():
    sum = sum + v
    print k, ':', v
print 'average', ':', sum / len(d)